(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
foldl(x, Cons(S(0), xs)) → foldl(S(x), xs)
foldl(S(0), Cons(x, xs)) → foldl(S(x), xs)
foldr(a, Cons(x, xs)) → op(x, foldr(a, xs))
foldr(a, Nil) → a
foldl(a, Nil) → a
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
op(x, S(0)) → S(x)
op(S(0), y) → S(y)
fold(a, xs) → Cons(foldl(a, xs), Cons(foldr(a, xs), Nil))
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
foldl(x, Cons(S(0), xs)) →+ foldl(S(x), xs)
gives rise to a decreasing loop by considering the right hand sides subterm at position [].
The pumping substitution is [xs / Cons(S(0), xs)].
The result substitution is [x / S(x)].
(2) BOUNDS(n^1, INF)